import types from '../types';

const state = {
  userId:'82',
  phoneNumber:'18235980719'
};

const getters = {
  userId(state){
    return state.userId
  },
  phoneNumber(state){
    return state.phoneNumber
  }
};

const mutations = {
  [types.CLEARDATA](state){
    state.userId='0';
    return state.phoneNumber='0';
  },
  [types.ADDRDATA](state){
    state.userId='100';
    return state.phoneNumber='15525862325';
  }
};

const actions = {
  LogInState({commit,state}){
    commit(types.CLEARDATA);
  },
  LogOutState({commit,state}){
    commit(types.ADDRDATA);
  }
};

export default {
  state,
  getters,
  mutations,
  actions
}
